#pragma once
#include "string"
#include "map"
#include "iRhw.h"

#include "OgreD3D9Prerequisites.h"


using namespace std;
struct  RenderInfo
{
	RenderInfo()
	{
		bisVisible = true;
		_colorTopLeft = 0;
		_colorTopRight = 1;
		_colorBottomLeft = 0;
		_colorBottomRight = 1;

		_x = 0;
		_y = 0;
		_width= 0;
		_height= 0;
		ZeroMemory( & _rcBoundingBox, sizeof(  _rcBoundingBox ) );
	}
	D3DCOLOR _colorTopLeft;
	D3DCOLOR _colorTopRight;
	D3DCOLOR _colorBottomLeft;
	D3DCOLOR _colorBottomRight;
	Ogre::TexturePtr _TexturePtr;
	int		_x;
	int		_y;
	int		_width;
	int		_height;
	RECT	_rcBoundingBox;
	bool	bisVisible;
};
typedef std::map<string,RenderInfo>  RenderInfoMap;


class _OgreD3D9Export CRhw : public iCRhw
{
public:
	CRhw(void);
	~CRhw(void);
	void		addRenderInfo(const char *key);
	void		deleteRenderInfo(const char *key);
	void		setVisible(const char *key,bool visible);
	void		setPosition(const char *key,int x ,int y);
	void        SetSize(const char *key, int width, int height );
	void		SetTexture(const char *key,const char *textName);
	void		Render();
private:
	RenderInfo * GetRenderInfo(const char *key) ;

	RenderInfoMap		m_RenderInfoMap;


};
